#include "statusbar.h"
#include "ui_statusbar.h"

Statusbar::Statusbar(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::Statusbar)
{
    ui->setupUi(this);
}

void Statusbar::onRecvMessage(const QString &msg){
    //m_strRecvMsg = msg;
    ui->labelStatus->setText(msg);
    // 定时器 5 秒后触发
    QTimer::singleShot(5000, this, [this]() {
        ui->labelStatus->clear();
    });
}

Statusbar::~Statusbar()
{
    delete ui;
}
